package com.brest.managesambafilesharing;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;

public class MyNotificationMgrService extends Service {
	private int ToastTime = 3;

	@Override
	public IBinder onBind(Intent intent) {

		return null;
	}

	@Override
	public void onStart(Intent intent, int startId) {
		try {
			String s = intent.getAction();
			LOG.i((new StringBuilder(String.valueOf(Misc.getDateTime())))
					.append(" - Received: :").append(s).append(". ").toString());
			if ("INTENTINFO_START_FROM_NOTIF".equals(s)) {
				LOG.d("INTENTINFO_START_FROM_NOTIF");
			} else if ("INTENTINFO_STOP_FROM_NOTIF".equals(s)) {
				LOG.d("INTENTINFO_STOP_FROM_NOTIF");
			}
		} catch (Exception e) {
			LOG.e(e.getMessage());
		}
		super.onStart(intent, startId);
	}
	/*
	 * private static final String ACTION =
	 * "android.provider.Telephony.SMS_RECEIVED";
	 * 
	 * private BroadcastReceiver yourReceiver;
	 * 
	 * @Override public void onCreate() { super.onCreate();
	 * 
	 * final IntentFilter theFilter = new IntentFilter();
	 * theFilter.addAction(ACTION);
	 * 
	 * this.yourReceiver = new BroadcastReceiver() {
	 * 
	 * @Override public void onReceive(Context context, Intent intent) { // Do
	 * whatever you need it to do when it receives the broadcast // Example show
	 * a Toast message... showSuccessfulBroadcast(); } };
	 * 
	 * // Registers the receiver so that your service will listen for broadcasts
	 * this.registerReceiver(this.yourReceiver, theFilter); }
	 * 
	 * @Override public void onDestroy() { super.onDestroy();
	 * 
	 * // Do not forget to unregister the receiver!!!
	 * this.unregisterReceiver(this.yourReceiver); }
	 * 
	 * private void showSuccessfulBroadcast() { Toast.makeText(this,
	 * "Broadcast Successful!!!", Toast.LENGTH_LONG).show(); } //
	 */
}
